package cn.bx.bid.ctrl;

import cn.bx.bid.entity.Userrole;
import cn.bx.bid.service.RoleService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class RoleController {
    @Resource
    RoleService roleService;

    @GetMapping(value = "findRoles",produces = "application/json;charset=utf-8")
    @ResponseBody
    public List<Userrole> findALL(){
        List<Userrole> list=    roleService.findALL();
        return list;
    }

}
